<template>
  <div class="page_content">
    <header>
      <van-nav-bar class="main_header" title="团体信息">
        <template #left>
          <span @click="goBack">返回</span>
        </template>
      </van-nav-bar>
    </header>
    <div class="main_content">
      <van-cell v-for="item in optMenuList" :key="item.code" :title="item.name" is-link @click="handleClickMenu(item)" />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      optMenuList: [
        {
          code: 'team/info',
          name: '基础信息',
          role: ''
        },
        {
          code: 'team/member',
          name: '团体会员',
          role: ''
        }
      ]
    };
  },
  created() {
    this.gameId = this.$route.params.id;
  },
  methods: {
    handleClickMenu(menuItem) {
      this.$router.push({
        path: `/myCenter${this.gameId && '/' + this.gameId || ''}/${menuItem.code}`
      });
    },
    goBack() {
      this.$router.push({
        path: `/myCenter${this.$route.params.id && '/' + this.$route.params.id || ''}/`
      });
    }
  }
};
</script>
